home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-19 / gpt32src.zip / DXY.TRM < prev    next >
Text File  |  1992-03-25  |  2KB  |  129 lines

  1. /*
  2.  * $Id: dxy.trm,v 3.26 92/03/24 22:34:50 woo Exp Locker: woo $
  3.  */
  4.  
  5. /* GNUPLOT - dxy.trm */
  6. /*
  7.  * Copyright (C) 1990, 1991, 1992   
  8.  *
  9.  * Permission to use, copy, and distribute this software and its
  10.  * documentation for any purpose with or without fee is hereby granted, 
  11.  * provided that the above copyright notice appear in all copies and 
  12.  * that both that copyright notice and this permission notice appear 
  13.  * in supporting documentation.
  14.  *
  15.  * Permission to modify the software is granted, but not the right to
  16.  * distribute the modified code.  Modifications are to be distributed 
  17.  * as patches to released version.
  18.  *  
  19.  * This software  is provided "as is" without express or implied warranty.
  20.  * 
  21.  * This file is included by ../term.c.
  22.  *
  23.  * This terminal driver supports:
  24.  *  Roland DXY800A plotter 
  25.  *
  26.  * AUTHORS
  27.  *  Martin Yii, eln557h@monu3.OZ
  28.  *  Further modified Jan 1990 by Russell Lang, rjl@monu1.cc.monash.oz
  29.  * 
  30.  * send your comments or suggestions to (info-gnuplot@ames.arc.nasa.gov).
  31.  * 
  32.  */
  33.  
  34. #define DXY_XMAX 2470
  35. #define DXY_YMAX 1700
  36.  
  37. #define DXY_XLAST (DXY_XMAX - 1)
  38. #define DXY_YLAST (DXY_XMAX - 1)
  39.  
  40. #define DXY_VCHAR    (56)    /* double actual height of characters */
  41. #define DXY_HCHAR    (28)    /* actual width including spacing */
  42. #define DXY_VTIC    (28)        
  43. #define DXY_HTIC    (28)        
  44.  
  45. int dxy_angle = 0;
  46.  
  47. DXY_init()
  48. {
  49. /*
  50.     No initialisation sequences for DXY 800A
  51. */
  52. }
  53.  
  54.  
  55. DXY_graphics()
  56. {
  57.     /* HOME, Character size 3 */
  58.     fprintf(outfile,"H\nS3\n");
  59. }
  60.  
  61.  
  62. DXY_text()
  63. {
  64. /*
  65.     No sequences needed
  66. */
  67. }
  68.  
  69.  
  70. DXY_linetype(linetype)
  71. int linetype;
  72. {
  73.     /* select pen */
  74.     fprintf(outfile,"J%d\n",(linetype+2)%8+1);
  75.     switch(linetype) {
  76.        case -1 :  /* use dotted line for axis */
  77.                fprintf(outfile,"L1\nB50\n");
  78.             break;
  79.        default :  /* use solid line for all others */
  80.             fprintf(outfile,"L0\n");
  81.                 break;
  82.        }
  83. }
  84.  
  85.  
  86. DXY_move(x,y)
  87. int x,y;
  88. {
  89.     fprintf(outfile,"M%d,%d\n",x,y);
  90. }
  91.  
  92.  
  93. DXY_vector(x,y)
  94. int x,y;
  95. {
  96.     fprintf(outfile,"D%d,%d\n",x,y);
  97. }
  98.  
  99.  
  100. DXY_put_text(x,y,str)
  101. int x, y;
  102. char *str;
  103. {
  104.     if (dxy_angle == 1 ) 
  105.         /* vertical */
  106.         DXY_move(x + DXY_VCHAR/4,y);
  107.     else
  108.         /* horiz */
  109.         DXY_move(x,y - DXY_VCHAR/4);
  110.     fprintf(outfile,"P%s\n",str);
  111. }
  112.  
  113.  
  114. int DXY_text_angle(ang)
  115. int ang;
  116. {
  117.     dxy_angle = ang;
  118.     fprintf(outfile,"Q%d\n",ang);
  119.     return TRUE;
  120. }
  121.  
  122.  
  123. DXY_reset()
  124. {
  125.     /* Home pen */
  126.     fprintf(outfile,"H\n");
  127. }
  128.  
  129.